package com.valid;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import com.valid.anno.UserStatus;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.ScriptAssert;


import lombok.Data;

//@ScriptAssert(script = "_this.name==_this.fullName", lang = "javascript")
@Data
public class UserInfo {

    @NotNull
    private String name;

    @Min(1) @Max(20)
    @NotNull
    private Integer age;
    
    @Length(min = 2)
    @NotNull
    private String fullName;

    @UserStatus
    private Integer status;
}